package system

import (
	"5title_gin/internal/model"
	"time"
)

// OperLog 操作日志
type OperLog struct {
	model.Models
	Title         string    `gorm:"size:64;comment:操作标题" json:"title"`
	BusinessType  uint8     `gorm:"comment:业务类型: 1=增, 2=删, 3=改" json:"business_type"`
	Method        string    `gorm:"size:100;comment:操作方法名" json:"method"`
	RequestMethod string    `gorm:"size:10;comment:请求方法" json:"request_method"`
	OperatorType  uint8     `gorm:"comment:操作者类型: 1=管理员, 2=普通用户" json:"operator_type"`
	OperName      string    `gorm:"size:50;comment:操作者姓名" json:"oper_name"`
	DeptName      string    `gorm:"size:255;comment:部门名称" json:"dept_name"`
	OperUrl       string    `gorm:"size:255;comment:操作URL" json:"oper_url"`
	OperIp        string    `gorm:"size:128;comment:操作IP地址" json:"oper_ip"`
	OperLocation  string    `gorm:"size:255;comment:操作地点" json:"oper_location"`
	OperParam     string    `gorm:"size:4000;comment:请求参数" json:"oper_param"`
	JsonResult    string    `gorm:"size:4000;comment:返回结果" json:"json_result"`
	Status        uint8     `gorm:"comment:状态: 0=失败, 1=成功" json:"status"`
	ErrorMsg      string    `gorm:"size:4000;comment:错误信息" json:"error_msg"`
	OperTime      time.Time `gorm:"index;comment:操作时间" json:"oper_time"`
}
